// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

/**
 * Enum for lane change.
 */
enum class FWorldLaneChange
{
	Increase,
	Decrease,
	Both,
	None
};

inline FWorldLaneChange FWorldLaneChangeFromJson(const json& j)
{
	if (j == "increase")	return FWorldLaneChange::Increase;
	if (j == "decrease")	return FWorldLaneChange::Decrease;
	if (j == "both")		return FWorldLaneChange::Both;
	if (j == "none")		return FWorldLaneChange::None;
	return FWorldLaneChange::Both;
}

inline json FWorldLaneChangeToJson(FWorldLaneChange p)
{
	if (p == FWorldLaneChange::Increase)	return "increase";
	if (p == FWorldLaneChange::Decrease)	return "decrease";
	if (p == FWorldLaneChange::Both)		return "both";
	if (p == FWorldLaneChange::None)		return "none";
	return "both";
}

inline void from_json(const json& j, FWorldLaneChange& p)
{
	p = FWorldLaneChangeFromJson(j);
}

inline void to_json(json& j, const FWorldLaneChange& p)
{
	j = FWorldLaneChangeToJson(p);
}
